package com.org.redis.config;

import redis.clients.jedis.JedisPoolConfig;

public class RedisPoolConfigBuilder {

    public static JedisPoolConfig defaultConfig() {
        JedisPoolConfig config = new JedisPoolConfig();
        config.setMaxTotal(RedisConfig.MAX_TOTAL);
        config.setMaxIdle(RedisConfig.MAX_IDLE);
        config.setMaxWaitMillis(RedisConfig.MAX_WAIT);
        config.setTestOnBorrow(RedisConfig.TEST_ON_BORROW);
        config.setTestOnReturn(RedisConfig.TEST_ON_RETURN);
        return config;
    }
}
